package cc.yugu.yhdw.webserver.persistence.hdw;

import cc.yugu.yhdw.common.domain.hdw.Item;
import cc.yugu.yhdw.common.persistence.MasterMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
/**
 * 商品信息
 * 
 * @Date:Created in 2018/6/30 16:48
 * @Author:
 * @Modified By: zjn 2018/6/30 16:48
 */ 
public interface ItemMapper extends MasterMapper {
    /**
    * 根据主键和商品状态查询表hdw_item
    * 
    * @Param: [id]
    * @Return: cc.yugu.yhdw.common.domain.hdw.Item
    * @Author By: zjn 2018/6/30  16:48
    */ 
    public Item find(int id);
    /**
    * 查询 1 条
    * 
    * @Param: [property, value]
    * @Return: java.lang.String
    * @Author By: zjn 2018/6/30  16:48
    */ 
    public String hasRecordByProperty(@Param("property") String property, @Param("value") Object value);
    /**
    * 查询，返回行数
    * 
    * @Param: [search]
    * @Return: int
    * @Author By: zjn 2018/6/30  16:48
    */ 
    public int findPageCount(Item search);
    /**
    * 分页查询，并将查询结果按照编号排序
    * 
    * @Param: [search]
    * @Return: java.util.List<cc.yugu.yhdw.common.domain.hdw.Item>
    * @Author By: zjn 2018/6/30  16:48
    */ 
    public List<Item> findPageResult(Item search);
    /**
    * 插入
    * 
    * @Param: [entity]
    * @Return: int
    * @Author By: zjn 2018/6/30  16:48
    */ 
    public int insert(Item entity);
    /**
    * 根据主键更新
    * 
    * @Param: [entity]
    * @Return: int
    * @Author By: zjn 2018/6/30  16:48
    */ 
    public int update(Item entity);
    /**
    * 
    * 
    * @Param: [id, secondPrice, secondItemId]
    * @Return: int
    * @Author By: zjn 2018/6/30  16:48
    */ 
    public int updateSecond(@Param("id") int id, @Param("secondPrice") Float secondPrice, @Param("secondItemId") Integer secondItemId);
    /**
    * 根据主键更新编号
    * 
    * @Param: [id, orderNum]
    * @Return: int
    * @Author By: zjn 2018/6/30  16:48
    */ 
    public int updateOrderNum(@Param("id") int id, @Param("orderNum") Integer orderNum);
    /**
    * 根据主键删除
    * 
    * @Param: [id]
    * @Return: int
    * @Author By: zjn 2018/6/30  16:48
    */ 
    public int delete(int id);
}
